<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="webtag" uri="http://www.iflexsys.tagslib.com.vn"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" isELIgnored="false"%>
<html>
<head>
<!--  date picker script -->
<script type="text/javascript" charset="utf-8">
	$(function() {
		// initialise the "Select date" link
		$("#seDate")
				.datepicker(
						// associate the link with a date picker
						{
							showOn : 'button',
							buttonImage : '<spring:theme code="theme.admin.images"/>/calendar.gif',
							buttonImageOnly : true,
							changeMonth : true, // must be disabled when using maxDate
							changeYear : true,
						//onSelect:function(selectedDate){
						//alert("as");
						//your_function(selectedDate);
						//}
						});
		$("#datepicker").datepicker();
		$('.askDelBook').jConfirmAction();
	});
</script>
<!--end form -->
<title>Top 10 sách bán chạy nhất</title>
</head>
<body>
	<div id="page-heading">
		<h1>Top 10 sách bán chạy nhất</h1>
	</div>
	<table id="rounded-corner" summary="2007 Major IT Companies' Profit">
		<thead>
			<tr>
				<th scope="col" class="rounded-company"></th>
				<th scope="col" class="rounded">Tên sách</th>
				<th scope="col" class="rounded">Loại sách</th>
				<th scope="col" class="rounded">Tác giả</th>
				<th scope="col" class="rounded">Giá</th>
			</tr>
		</thead>
		<c:choose>
			<c:when test="${empty listBook}">
				<tfoot><tr> <td colspan="8" align="center">Không tìm thấy bản ghi nào phù hợp </td></tr></tfoot>
			</c:when>
			<c:otherwise>
				<tbody>
				<c:forEach var="book" items="${listBook}">
				<tr>
					<td></td>
					<td>${book.name}</td>
					<td>
						<c:forEach items="${bookTypeList }" var="bookType">
							<c:if test="${book.bookTypeId == bookType.id}">
								${bookType.name }
							</c:if>
						</c:forEach>
					</td>
					<td>${book.author }</tdbook>
					<td>${book.price}</td>
				</tr>
				</c:forEach>
				<tbody>
			</c:otherwise>
		</c:choose>
	</table>
</body>
</html>